package gov.pbc.nn.uflo.dao;

import gov.pbc.nn.core.dao.AbstractJdbcDao;

import com.bstek.dorado.core.Configure;

/**
 * 该UFLO模块中使用的JDBC操作类
 * 
 * @author louis
 * 
 */
public class AbstractUfloJdbcDao extends AbstractJdbcDao {

	@Override
	protected String getModuleFixDataSourceName() {
		 return Configure.getString("bdf2.uflo.dataSourceName");
	}

	@Override
	protected String buildFieldName(String name) {
		if (name == null)
			return name;
		StringBuffer sb = new StringBuffer();
		for (char ch : name.toCharArray()) {
			boolean upper = Character.isUpperCase(ch);
			if (upper) {
				sb.append("_");
			}
			sb.append(Character.toUpperCase(ch));
		}
		sb.append("_");
		return sb.toString();
	}
}
